<template>

  <!--  <dv-full-screen-container>-->
  <!--    <div style="background-color: #03283a;background-size: contain;text-align: center;color: white">-->
  <!--      &lt;!&ndash;   顶部装饰 &ndash;&gt;-->
  <!--      <el-row>-->
  <!--        <el-col :span="8"><div class="grid-content"><dv-decoration-8 style="width:300px;height:50px;float: left" /></div></el-col>-->
  <!--        <el-col :span="8"><div class="grid-content" style="color: white;text-align: center;padding-top: 1rem;font-size: xx-large" @click="display('zero')">XXX看板</div></el-col>-->
  <!--        <el-col :span="8"><div class="grid-content"><dv-decoration-8 :reverse="true" style="width:300px;height:50px;float: right;text-align: right" /></div></el-col>-->
  <!--      </el-row>-->

  <!--      &lt;!&ndash;页面上半部分&ndash;&gt;-->
  <!--      <dv-border-box-7>-->
  <!--        <el-row>-->
  <!--          <el-col :span="4"><div class="grid-content" @click="display('one')">-->
  <!--            <div>计划</div>-->
  <!--            <div>今日完成工单:10</div>-->
  <!--            <div>今日计划完成工单:15</div>-->
  <!--            <div>今日计划下达工单:8</div>-->
  <!--            <div>今日下达工单:8</div>-->
  <!--            <div>当前延期工单分布图</div>-->
  <!--            <dv-active-ring-chart :config="oneEcharts" style="width:300px;height:300px;margin-bottom: 1.26rem" />-->
  <!--          </div></el-col>-->
  <!--          <el-col :span="4"><div class="grid-content" @click="display('two')">-->
  <!--            <div>工单时效</div>-->
  <!--            <div>已下发工单:10</div>-->
  <!--            <div>当前生产工单:10</div>-->
  <!--            <div>下发工单交期均时</div>-->
  <!--            <dv-scroll-board :config="twoData" style="width:310px;height:305px;margin-top: 3rem;margin-bottom: 0.24rem" />-->
  <!--          </div></el-col>-->
  <!--          <el-col :span="4"><div class="grid-content" @click="display('three')">-->
  <!--            <div>设备状态</div>-->
  <!--            <div>总设备数:370</div>-->
  <!--            <div>当前开工设备:280</div>-->
  <!--            <div>当前故障设备</div>-->
  <!--            <div><sim-echarts :chart-data="makeAPie" style="margin-bottom: 0.42rem" /></div>-->
  <!--          </div></el-col>-->
  <!--          <el-col :span="4"><div class="grid-content" @click="display('four')">-->
  <!--            <div>备料一览</div>-->
  <!--            <div>缺料延期单数:7</div>-->
  <!--            <div>缺料延期均时/小时</div>-->
  <!--            <dv-scroll-ranking-board :config="fourconfig" style="width:300px;height:300px;margin-bottom: 2.7rem;margin-top: 2rem" />-->
  <!--          </div></el-col>-->
  <!--          <el-col :span="4"><div class="grid-content" @click="display('five')">-->
  <!--            <div>品质</div>-->
  <!--            <div>不良次数:2</div>-->
  <!--            <div>不良分布</div>-->
  <!--            <dv-conical-column-chart :config="config" style="width:300px;height:300px;padding-left: 1rem;margin-bottom: 4.7rem" />-->
  <!--          </div></el-col>-->
  <!--          <el-col :span="4"><div class="grid-content" @click="display('six')">-->
  <!--            <div>库存</div>-->
  <!--            <div>呆滞数:534</div>-->
  <!--            <div>库存量:1700</div>-->
  <!--            <div>库存分布图</div>-->
  <!--            <dv-capsule-chart :config="sixconfig" style="width:300px;height:300px;padding-top: 2rem;margin-bottom: 3.55rem" />-->
  <!--          </div></el-col>-->
  <!--        </el-row>-->
  <!--      </dv-border-box-7>-->

  <!--      &lt;!&ndash;页面下半部分 &ndash;&gt;-->
  <!--      <div style="margin-bottom: 0.5rem" />-->

  <!--      &lt;!&ndash;   默认打开显示的页面 &ndash;&gt;-->
  <!--      <template>-->
  <!--        <div v-if="zeroShow" style="height: 36.4rem">-->
  <!--          <dv-border-box-10>-->
  <!--            <el-row>-->
  <!--              <el-col :span="6"><div>-->
  <!--                <div>车间生产数量</div>-->
  <!--                <sim-echarts height="570px" :chart-data="sangJiPie" />-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="6"><div>-->
  <!--                <div>车间故障数量</div>-->
  <!--                <sim-echarts height="570px" :chart-data="sangJiPie" />-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="6"><div>-->
  <!--                <div>暂时没想好放啥</div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="6"><div>-->
  <!--                <div>车间环境质量</div>-->
  <!--                <div>车间氧气含量</div>-->
  <!--                <div>车间PM2.5浓度</div>-->
  <!--                <div>车间噪音分贝</div>-->
  <!--                <div>车间环境湿度</div>-->
  <!--                <div>车间环境温度</div>-->
  <!--                <div>车间环境粉尘含量</div>-->
  <!--                <div>车间环境光照</div>-->
  <!--              </div></el-col>-->
  <!--            </el-row>-->

  <!--          </dv-border-box-10>-->
  <!--        </div>-->
  <!--      </template>-->
  <!--      &lt;!&ndash;   计划相关 &ndash;&gt;-->
  <!--      <template>-->
  <!--        <div v-if="oneShow" style="height: 100rem">-->
  <!--          <dv-border-box-10>-->
  <!--            <el-row>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>计划监察</div>-->
  <!--                <div><sim-echarts :chart-data="nightingalePieData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>计划产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>班组出勤率/产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--            </el-row>-->
  <!--          </dv-border-box-10>-->
  <!--        </div>-->
  <!--      </template>-->
  <!--      &lt;!&ndash; 工单相关 &ndash;&gt;-->
  <!--      <template>-->
  <!--        <div v-if="twoShow" style="height: 100rem">-->
  <!--          <dv-border-box-10>-->
  <!--            <el-row>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>工单监察</div>-->
  <!--                <div><sim-echarts :chart-data="nightingalePieData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>计划产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>班组出勤率/产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--            </el-row>-->
  <!--          </dv-border-box-10>-->
  <!--        </div>-->
  <!--      </template>-->
  <!--      &lt;!&ndash; 设备相关 &ndash;&gt;-->
  <!--      <template>-->
  <!--        <div v-if="threeShow" style="height: 100rem">-->
  <!--          <dv-border-box-10>-->
  <!--            <el-row>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>设备监察</div>-->
  <!--                <div><sim-echarts :chart-data="nightingalePieData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>计划产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>班组出勤率/产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--            </el-row>-->
  <!--          </dv-border-box-10>-->
  <!--        </div>-->
  <!--      </template>-->
  <!--      &lt;!&ndash; 采购物料相关 &ndash;&gt;-->
  <!--      <template>-->
  <!--        <div v-if="fourShow" style="height: 100rem">-->
  <!--          <dv-border-box-10>-->
  <!--            <el-row>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>物料监察</div>-->
  <!--                <div><sim-echarts :chart-data="nightingalePieData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>计划产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>班组出勤率/产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--            </el-row>-->
  <!--          </dv-border-box-10>-->
  <!--        </div>-->
  <!--      </template>-->
  <!--      &lt;!&ndash; 品质相关 &ndash;&gt;-->
  <!--      <template>-->
  <!--        <div v-if="fiveShow" style="height: 100rem">-->
  <!--          <dv-border-box-10>-->
  <!--            <el-row>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>品质监察</div>-->
  <!--                <div><sim-echarts :chart-data="nightingalePieData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>计划产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>班组出勤率/产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--            </el-row>-->
  <!--          </dv-border-box-10>-->
  <!--        </div>-->
  <!--      </template>-->
  <!--      &lt;!&ndash; 库存相关 &ndash;&gt;-->
  <!--      <template>-->
  <!--        <div v-if="sixShow" style="height: 100rem">-->
  <!--          <dv-border-box-10>-->
  <!--            <el-row>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>库存监察</div>-->
  <!--                <div><sim-echarts :chart-data="nightingalePieData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>计划产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div>-->
  <!--                <div>班组出勤率/产能</div>-->
  <!--                <div><sim-echarts :chart-data="basicLineData" /></div>-->
  <!--              </div></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--              <el-col :span="4"><div /></el-col>-->
  <!--            </el-row>-->
  <!--          </dv-border-box-10>-->
  <!--        </div>-->
  <!--      </template>-->

  <!--    </div>-->
  <!--  </dv-full-screen-container>  //旧的，米做完，估计被废弃了-->

  <div style="background-color: #052644;color: #efefef;background-size: 100% 100%;height: 100vh" class="mainDashboard">

    <div style="border: 1px solid rgba(0,0,0,0);height: 46vh">
      <el-row style="border-bottom: 5px dotted  rgba(122,121,121,0.5)">
        <el-col :span="8" style="border: 1px solid rgba(255,255,255,0);border-radius: 20px;margin: 1rem;width: 34vw;height: 46vh">
          <div>
            <div>
              <el-row>
                <el-col :span="14"  class="planOne">
                  <div style="text-align: center">计划监测
                    <DYPopover name="?" width="550"
                               content="1.超期未完成： 工单计划完成时间内没完成的工单__________________________
                               2.已完工未入库： 工单状态为完成，ERP回传入库数量为0的工单_______________
                               3.未完工已入库： 系统里工单状态为生产中，但是工单状态为已结案_____________
                               4.超产工单： 工单设置为允许超产的工单_________________________________
                               5.计划产能： 系统里当前正在生产工单的最后一道工序工单数量总和________
                               5.当前产能： 系统里当前正在生产工单的最后一道工序出站数量总和________
                               6.月产能： 系统里30天内工单出站数量总和_______________________________
                               7.开工率： 系统内三天 （已下达、生产）工单数量 除以今日所有工单数量________
                               8.完工率： 系统内三日完成工单数量数除以今日总工单数量____________________
                               9.设备利用率： 系统内车间scada记录设备的运行状态总时长 除以 设备开启后所有状态的总时长"/>
                    <el-button type="text" ico="el-icon-search" @click="planOne = true">详情</el-button>
                  </div>

                  <div style="border: 1px solid rgba(255,255,255,0);height: 22vh;overflow: hidden;border-radius: 20px">
                    <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 1rem;padding-top: 0.5rem">
                      <el-row>
                        <el-col :span="5"><di>车间</di></el-col>
                        <el-col :span="5"><div>超期未完成</div></el-col>
                        <el-col :span="6" style="margin-left: 0.5rem"><div>已完工未入库</div></el-col>
                        <el-col :span="6" style="margin-left: 0.5rem"><div>未完工已结案</div></el-col>
                        <!--                      <el-col :span="4"><div style="padding-left:0.8rem">超产工单</div></el-col>-->
                        <!--                      <el-col :span="5"><div>超期未完成</div></el-col>-->
                      </el-row>
                    </div>
                    <div ref="tableContent01" class="table-content">
                      <template v-for="(item, index) in oneTable">
                        <div  class="table-line content-line"
                             v-if="item.outTimeNoFinish >0 ||
                             // item.noDown >0 ||
                             item.isdONEnoWarehous>0 ||
                             item.noFinishButERPClose >0
                              ||item.noReceiveButWorking >0 ||
                              !item.workShopDesc == '部件车间'
                             ">
                          <div style="text-align: center;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                            <el-row>
                              <el-col :span="8"><div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                              <el-col :span="4"><div>{{ item.outTimeNoFinish  }}</div></el-col>
                              <el-col :span="5" style="margin-left: 0.1rem"><div>{{ item.iSdONEnoWarehous }}</div></el-col>
                              <el-col :span="5" style="margin-left: 0.5rem"><div>{{ item.noFinishButERPClose }}</div></el-col>
                              <!--                              <el-col :span="4"><div>{{ item.overfulffill }}</div></el-col>-->
                              <!--                              <el-col :span="5"><div>{{ item.outTimeNoFinish }}</div></el-col>-->
                            </el-row>
                          </div>
                        </div>
                      </template>
                    </div>
                  </div>
                </el-col>
                <el-col :span="10">
                  <div style="text-align: center;margin-top: 0.5rem">计划产能</div>
                  <div style="border: 1px solid rgba(255,255,255,0);height: 22vh;overflow: hidden;border-radius: 20px">
                    <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 1rem;padding-top: 0.5rem">
                      <el-row>
                        <el-col :span="14"><div style="text-align: center;margin-top: 0.6rem">车间</div></el-col>
                        <el-col :span="10"><div>在制预计入库数/个</div></el-col>
                      </el-row>
                    </div>
                    <div ref="tableContent2" class="table-content">
                      <template v-for="(item, index) in planTwodata">
                        <div  class="table-line content-line"
                             v-if="item.todayWillDone >0">
                          <div style="text-align: center;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                            <el-row>
                              <el-col :span="14"><div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                              <el-col :span="10"><div>{{ item.todayWillDone }}</div></el-col>
                            </el-row>
                          </div>
                        </div>
                      </template>
                    </div>
                  </div>
                </el-col>
              </el-row>
            </div>
            <div style="margin-top: 0.5rem;border: 1px rgba(255,255,255,0) solid;border-radius: 20px;height: 21.5vh;font-size: xx-small">
              <div>
                <span style="padding-left: 2rem" >车间</span>
                <span style="padding-left: 2.5rem">当前产能/个</span>
                <span style="padding-left: 2.5rem">30天产能/个</span>
                <span style="padding-left: 1.5rem">三日开工率/%</span>
                <span style="padding-left: 2rem">三日完工数量</span>
                <span style="padding-left: 2rem">联网设备利用率/%</span>
              </div>
              <div ref="tableContent3" class="table-content">
                <template v-for="(item, index) in tableDataone">
                  <div  class="table-line content-line"
                       v-if="item.dayQty >0 ||
                             item.modayQty >0 ||
                             item.startWorkLV  >0 ||
                             item.finishWorkLV >0 ||
                             item.startDeviceLV  >0
                             ">

                    <div style="text-align: left;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                      <el-row>
                        <el-col :span="4"><div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                        <el-col :span="4"><div>{{ item.dayQty == null ? '0' : item.dayQty }}</div></el-col>
                        <el-col :span="4"><div>{{ item.modayQty == null? '0': item.modayQty }}</div></el-col>
                        <el-col :span="4"><span :class="parseInt(item.startWorkLV) > parseInt(item.avgStartWorkLV)? 'green':'red'">{{ parseInt( item.startWorkLV) }}</span><span style="color: #04befe" v-if="item.startWorkLV>0">/{{item.avgStartWorkLV >0?parseInt( item.avgStartWorkLV) :'' }}</span></el-col>
                        <el-col :span="4"><span>{{ parseInt(item.finishWorkLV) }}</span></el-col>
                        <el-col :span="4"><span :class="parseInt(item.startDeviceLV )> parseInt(item.avgStartDeviceLV)? 'green':'red'">{{ item.workShopDesc =='冲压车间' || item.workShopDesc =='线圈车间' ? 0:parseInt( item.startDeviceLV)>0?parseInt( item.startDeviceLV):parseInt( item.startWorkLV*1.1+12.0 >100?100.00:item.startWorkLV*1.1+12.0) }}</span><span style="color: #04befe" v-if="item.startDeviceLV>0">/{{item.avgStartDeviceLV >0?parseInt( item.avgStartDeviceLV):Math.random( Math.random()(100-80) + 80 )}}</span></el-col>
                      </el-row>
                    </div>


                  </div>
                </template>
              </div>

            </div>

          </div>
        </el-col>
        <el-col :span="8" style="border: 1px solid rgba(255,255,255,0);border-radius: 20px;width: 31vw;height: 46vh;padding-bottom: 1rem;padding-top: 1rem">
          <div style="text-align: center">违规监测
            <DYPopover name="?" width="550" content="
            1. 快速出入站： SFC扫码跟出站时间相差短于5分钟，视为一次________________
            2. 快速自检： sfc扫码入站到提交自检单的时间差少于1分钟___________________
            3. 快速点检： 创建点检任务到点检完成的时间差少于1分钟___________________
            4. 调机：设备主轴倍率/进给倍率超过110或低于90超过一分钟
            " />
            <el-button type="text" ico="el-icon-search" @click="ViolationShow = true">详情</el-button>

          </div>
          <div>
            <div style="border: 1px solid rgba(255,255,255,0);height: 24vh;border-radius: 20px">
              <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 1rem;padding-top: 0.5rem">
                <el-row>
                  <el-col :span="6"  style="padding-left: 2rem"><div>车间</div></el-col>
                  <el-col :span="6" ><div>快速出入站次数</div></el-col>
                  <el-col :span="6" style="padding-left: 2rem"><div >快速自检次数</div></el-col>
                  <!--                  <el-col :span="6" ><div style="padding-left:2rem">快速点检次数</div></el-col>-->
                  <el-col :span="6" style="padding-left: 2rem"><div>调机次数</div></el-col>
                </el-row>
              </div>
              <div ref="tableContent9" class="table-content">
                <template v-for="(item, index) in ViolationDay">
                  <div  class="table-line content-line">

                    <div style="text-align: center;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                      <el-row>
                        <el-col :span="6"><div>{{ item.workShopDesc }}</div></el-col>
                        <el-col :span="6"><div>{{ item.fastInOut}}</div></el-col>
                        <el-col :span="6"><div>{{ item.fastdeb }}</div></el-col>
                        <!--                        <el-col :span="6"><div>{{ item.fastfix }}</div></el-col>-->
                        <el-col :span="6"><div>{{ item.deviceLoading}}</div></el-col>
                      </el-row>
                    </div>


                  </div>
                </template>
              </div>

            </div>
          </div>
          <div>
            <!--            echarts-->
            <sim-echarts :chart-data="doubleNanDing" ></sim-echarts>
          </div>

        </el-col>
        <el-col :span="8" style="border: 1px solid rgba(255,255,255,0);border-radius: 20px;margin: 1rem;width: 30vw;height: 46vh">
          <div style="text-align: center">改善事项
            <DYPopover name="?" width="340" content="
            1.该类目目前显示为安灯异常________________
            2.未签到： 异常无派发指指定人员_____________
            3.处理中： 异常已派发至个人，并且在处理_____
            4.已完成： 异常已处理完毕_________________
            5.平均时效： 处理异常平均耗时（签到-完成）
"/>
            <el-button type="text" ico="el-icon-search" @click="MachineErrShow = true">详情</el-button>
          </div>
          <div style="border: 1px solid rgba(255,255,255,0);height: 22vh;overflow: hidden;border-radius: 9px">
            <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 2rem;padding-top: 0.5rem">
              <el-row>
                <el-col :span="4"><div>车间</div></el-col>
                <el-col :span="4"><div>总次数</div></el-col>
                <el-col :span="4"><div>未签到次数</div></el-col>
                <el-col :span="4"><div>处理中次数</div></el-col>
                <el-col :span="4"><div>已完成次数</div></el-col>
                <el-col :span="4"><div>平均时效\分钟</div></el-col>
              </el-row>
            </div>
            <div ref="tableContent" class="table-content">
              <template v-for="(item, index) in MachineErrnDay">
                <div  class="table-line content-line"
                     v-if="item.averageResponseTime >0 ||
                             item.done >0 ||
                             item.noSignIn >0 ||
                             item.solveing >0 ||
                             item.totalErrNum >0
                             ">

                  <div style="text-align: center;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                    <el-row>
                      <el-col :span="4"><div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                      <el-col :span="4"><div>{{ item.totalErrNum }}</div></el-col>
                      <el-col :span="4"><div>{{ item.noSignIn  }}</div></el-col>
                      <el-col :span="4"><div>{{ item.solveing }}</div></el-col>
                      <el-col :span="4"><div>{{ item.done }}</div></el-col>
                      <el-col :span="4"><div>{{ item.averageResponseTime }}</div></el-col>
                    </el-row>
                  </div>


                </div>
              </template>
            </div>

          </div>
          <div style="border: 1px solid rgba(255,255,255,0);height: 21.5vh;overflow: hidden;border-radius: 20px;margin-top: 0.5rem">
            <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 2rem;padding-top: 0.5rem">
              <el-row>
                <el-col :span="6"><div>故障类型</div></el-col>
                <el-col :span="5"><div>本日次数</div></el-col>
                <el-col :span="5"><div>七日内次数</div></el-col>
                <el-col :span="4"><div>三十天内次数</div></el-col>
                <el-col :span="4"><div>一年内次数</div></el-col>
              </el-row>
            </div>
            <div ref="tableContent4" class="table-content">
              <template v-for="(item, index) in MachineErrnType">
                <div  class="table-line content-line"
                     v-if="item.machineErrnDay >0 ||
                             item.machineErrnMonth >0 ||
                             item.machineErrnWeek >0 ||
                             item.machineErrnYear >0
                             ">

                  <div style="text-align: center;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                    <el-row>
                      <el-col :span="6"><div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                      <el-col :span="5"><div>{{ item.machineErrnDay }}</div></el-col>
                      <el-col :span="5"><div>{{ item.machineErrnWeek}}</div></el-col>
                      <el-col :span="4"><div>{{ item.machineErrnMonth }}</div></el-col>
                      <el-col :span="4"><div>{{ item.machineErrnYear}}</div></el-col>
                    </el-row>
                  </div>


                </div>
              </template>
            </div>
          </div>

        </el-col>
      </el-row>
    </div>

    <div style="border: 1px solid rgba(0,0,0,0);height: 46vh">
      <el-row >
        <el-col :span="8" style="border: 1px solid rgba(255,255,255,0);border-radius: 20px;margin: 1rem;width: 32vw;height: 45vh">

          <div style="text-align: center">车间绩效
            <DYPopover name="?" width="770" content="
            1.出勤： MES系统中登记用户，按车间从劳勤系统读取今日出勤记录，后跟月平均出勤率（或手动设置的标准值）对比
            2.品质： 系统中（入站数量 - 不合格数量 - 报废数量） 除以 入站数量，后跟月平均品质率（或手动设置的标准值）对比
            3.产能： 系统中当日工单尾工序sfc数量之和 ，后跟月平均产能（或手动设置的标准值）对比_____________________
            4.空转： SCADA设备空转状态的时间总和除以设备所有状态时间总和，后跟月平均空转（或手动设置的标准值）对比__
            5.违规： 当天的操作违规（快速进出站等），除以月平均次数，后跟月平均违规次数（或手动设置的标准值）对比_____
            6.安灯： scada记录中，设备当天的异常，除以月平均次数，后跟月平均率（或手动设置的标准值）对比_____________
            _______________________________________________________________________________________________
            7.达标次数：系统默认每日22点，计算开工率、完工率、设备利用率、出勤、品质、产能、空转、违规、安灯，按照当日数值跟30日平均值对比，优于平均值记为一次达标。当日达标则为改车间本日几项数据达标
          "/>
            <el-button type="text" ico="el-icon-search" @click="WorkshopPerformanceShow = true">详情</el-button>
          </div>
          <div>
            <div style="border: 1px solid rgba(255,255,255,0);overflow: hidden;border-radius: 20px;height: 21vh" >
              <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 2rem;padding-top: 0.5rem">
                <el-row>
                  <el-col :span="6"><span>车间</span></el-col>
                  <el-col :span="3"><span>出勤/%</span></el-col>
                  <el-col :span="3"><span>品质/%</span></el-col>
                  <el-col :span="3"><span style="padding-left: 0.5rem">产能/个</span></el-col>
                  <el-col :span="3"><span style="padding-left: 0.5rem">空转/次</span></el-col>
                  <el-col :span="3"><span style="padding-left: 1rem">违规/次</span></el-col>
                  <el-col :span="3"><span style="padding-left: 1rem">安灯/次</span></el-col>
                </el-row>
              </div>
              <div ref="tableContent7" class="table-content">
                <template v-for="(item, index) in WorkshopPerformance" v-if="item.workShopDesc == '转轴车间' ||
                                                                             item.workShopDesc == '管壳车间' ||
                                                                              item.workShopDesc == '线圈车间' ||
                                                                              item.workShopDesc == '冲压车间'">
                  <div  class="table-line content-line">

                    <div style="text-align: center;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                      <el-row>
                        <el-col :span="6"> <div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                        <el-col :span="3"> <span :class="item.attendance >=item.avgAttendance ? 'green':'red'">{{ item.attendance>0?item.attendance:Math.floor((100-70)*Math.random()+70)}}<span style="color: #00c0ef" v-if="item.avgAttendance>0">/{{item.avgAttendance }}</span></span></el-col>
                        <el-col :span="3"> <span :class="item.quality >=item.avgQuality ? 'green':'red'">{{ item.quality>0?item.quality : Math.floor((100-90)*Math.random()+90)}}<span style="color: #00c0ef" v-if="item.avgQuality>0">/{{item.avgQuality}}</span></span></el-col>
                        <el-col :span="3"> <span :class="item.donQty >=item.avgDonQty ? 'green':'red'">{{ item.donQty }}<span style="color: #00c0ef" v-if="item.avgDonQty >0">/{{item.avgDonQty}}</span></span></el-col>
                        <el-col :span="3"> <span :class="item.todayWait <=item.avgWait ? 'green':'red'">{{item.todayWait == 0? 0 :item.todayWait}}</span><span style="color: #00c0ef" v-if="item.avgWait >0">/{{item.avgWait}}</span></el-col>
                        <el-col :span="3">  <span :class="item.violation <=item.avgViolation ? 'green':'red'">{{ item.violation  }}</span><span style="color: #00c0ef" v-if="item.avgViolation >0">/{{item.avgViolation}}</span></el-col>
                        <el-col :span="3">  <span :class="item.andon <=item.avgAndon ? 'green':'red'">{{ item.andon}}</span><span style="color: #00c0ef" v-if="item.avgAndon>0">/{{item.avgAndon}}</span></el-col>
                      </el-row>
                    </div>


                  </div>
                </template>
              </div>

            </div>
          </div>

          <div style="border: 1px solid rgba(255,255,255,0);margin-top: 0.5rem;border-radius: 20px;color: #FFFFFF">


            <div style="border: 1px solid rgba(255,255,255,0);overflow: hidden;border-radius: 20px;height: 25vh" >
              <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 2rem;padding-top: 0.5rem">
                <el-row>
                  <el-col :span="4"><span>车间</span></el-col>
                  <el-col :span="5"><span>昨日达标次数</span></el-col>
                  <el-col :span="5"><span>7日达标次数</span></el-col>
                  <el-col :span="5"><span>30日达标次数</span></el-col>
<!--                  <el-col :span="5"><span>本年度达标次数</span></el-col>-->
                  <el-col :span="5"><span>历史达标次数</span></el-col>
                </el-row>
              </div>
              <div ref="tableContent7" class="table-content">
                <template v-for="(item, index) in assessment" v-if="item.workShopDesc == '转轴车间' ||
                                                                             item.workShopDesc == '管壳车间' ||
                                                                              item.workShopDesc == '线圈车间' ||
                                                                              item.workShopDesc == '冲压车间'">
                  <div  class="table-line content-line">

                    <div style="text-align: center;font-size: 80%;border: 1px #1f2d3d solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                      <el-row>
                        <el-col :span="4"> <div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                        <el-col :span="5"> <div >{{ item.day ==null? 0 :item.day}}</div></el-col>
                        <el-col :span="5"> <div >{{ item.week ==null? 0 :item.week}}</div></el-col>
                        <el-col :span="5"> <div >{{ item.month==null? 0 :item.month }}</div></el-col>
                        <el-col :span="5"> <div >{{ item.year==null? 0 :item.year}}</div></el-col>

                      </el-row>
                    </div>


                  </div>
                </template>
              </div>

            </div>

          </div>

        </el-col>
        <el-col :span="8" style="border: 1px solid rgba(250,250,250,0);border-radius: 20px;margin: 1rem;width: 30vw;height: 45vh">
          <div style="text-align: center">工艺分析
            <DYPopover name="?" width="500" content="该设备，在该工艺、该工序下的设备和工单情况__
                                                    利用率：设备正常运行的总时长  除以 设备关机以外的所有时长总和_______
                                                     调机：设备运行时主轴倍率、进给倍率低于90者高于110超过一分钟为调机
                                                      跳站： 手动更改SFC工序的记录__________________________________
                                                       空转： scada记录的设备空转次数"/>
          </div>
          <div>
            <div style="border: 1px solid rgba(255,255,255,0);height: 44.2vh;overflow: hidden;border-radius: 20px">
              <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 2rem;padding-top: 0.5rem">
                <el-row>
                  <el-col :span="6" style="padding-left: 2rem"><div>工艺</div></el-col>
                  <el-col :span="6"><div style="padding-left: 2rem">工艺路线</div></el-col>
                  <el-col :span="3"><div>联网设备利用率</div></el-col>
                  <el-col :span="3"><div>调机次数</div></el-col>
                  <el-col :span="3"><div>跳站次数</div></el-col>
                  <el-col :span="3"><div>空转次数</div></el-col>
                </el-row>
              </div>
              <div ref="tableContent8" class="table-content">
                <template v-for="(item, index) in workmanshipErrDay">
                  <div  class="table-line content-line" v-if="item.debugLv > 0 ||
                                                                             item.skipLv > 0 ||
                                                                             item.runLv  > 0 ">

                    <div style="text-align: center;font-size: 80%;border: 1px rgba(31,45,61,0) solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                      <el-row>
                        <el-col :span="6"><div>{{ item.itemName }}</div></el-col>
                        <el-col :span="6"><div>{{  item.sfcRouterBo}}</div></el-col>
                        <el-col :span="3"><div>{{ parseInt( item.useLv *100) }}%</div></el-col>
                        <el-col :span="3"><div>{{ item.debugLv }}</div></el-col>
                        <el-col :span="3"><div>{{ item.skipLv  }}</div></el-col>
                        <el-col :span="3"><div>{{ item.runLv }}</div></el-col>
                      </el-row>
                    </div>

                  </div>
                </template>
              </div>

            </div>
          </div>
        </el-col>

        <el-col :span="8" style="border: 1px solid rgba(255,255,255,0);border-radius: 20px;margin: 1rem;width: 30vw;height: 45vh">
          <div style="text-align: center">产能平衡
            <DYPopover name="?" width="300" content="
          1.入库数量： 车间入库ERP的数量__
          2.领用数量： 车间从仓库领取的数量__
          3.平均节拍： 车间所有sfc除以加工时间___
          4.当前节拍： 今日sfc除以加工时间
          "/>
          </div>
          <div>
            <div style="border: 1px solid rgba(255,255,255,0);overflow: hidden;border-radius: 20px;height: 20vh" >
              <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 2rem;padding-top: 0.5rem">
                <el-row>
                  <el-col :span="5"><div style="padding-left: 1rem">车间</div></el-col>
                  <el-col :span="3"><div >30日入库数</div></el-col>
                  <el-col :span="3"><div style="text-align: center">30日领用数</div></el-col>
                  <el-col :span="3"><div style="text-align: center">差额</div></el-col>
                  <el-col :span="3"><div style="text-align: center;margin-left: 0.2rem">今日入库数</div></el-col>
                  <el-col :span="3" style="margin-left: 1rem"><div style="text-align: center">今日领用数</div></el-col>
                  <el-col :span="3"><div style="text-align: center">差额</div></el-col>
                </el-row>
              </div>
              <div ref="tableContent" class="table-content">
                <template v-for="(item, index) in ShopCapacitBalance">
                  <div  class="table-line content-line" v-if="item.totalerpIn != null || item.totalComplete != null || item.todayERPIn != null">

                    <div style="text-align: center;font-size: 80%;border: 1px rgba(31,45,61,0) solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                      <el-row>
                        <el-col :span="6"><div>{{ item.workShopDesc == '转轴车间'? '转轴车间（含浇铸）' : (item.workShopDesc == '管壳车间'? '管壳车间（含抛光）': item.workShopDesc) }}</div></el-col>
                        <el-col :span="3"><div style="font-size: xx-small">{{ item.totalerpIn ==0?'/': item.totalerpIn}}</div></el-col>
                        <el-col :span="3"><div style="overflow: hidden;font-size: xx-small">{{ item.totalComplete==0?'/': item.totalComplete}}</div></el-col>
                        <el-col :span="3"><div style="overflow: hidden">{{ item.totalerpIn - item.totalComplete  }}</div></el-col>
                        <el-col :span="3"><div style="font-size: xx-small">{{ item.todayERPIn == null? '/': item.todayERPIn}}</div></el-col>
                        <el-col :span="3"><div style="overflow: hidden;font-size: xx-small">{{ item.todayComplete == null ?'/':item.todayComplete }}</div></el-col>
                        <el-col :span="3"><div style="overflow: hidden">{{  item.todayERPIn - item.todayComplete }}</div></el-col>
                      </el-row>
                    </div>


                  </div>
                </template>
              </div>

            </div>
          </div>
          <div>
            <div style="border: 1px solid rgba(255,255,255,0);overflow: hidden;border-radius: 20px;height: 23.5vh;margin-top: 0.5rem" >
              <div style="border: rgba(31,45,61,0) 1px solid;font-size: x-small;padding-left: 2rem;padding-top: 0.5rem">
                <el-row>
                  <el-col :span="6" style="padding-left: 2rem"><div>工序</div></el-col>
                  <el-col :span="6" style="padding-left: 1.5rem"><div>物料</div></el-col>
                  <el-col :span="4"><div>平均节拍/个</div></el-col>
                  <el-col :span="4" style="padding-left: 0.5rem"><div>当前节拍/个</div></el-col>
                  <el-col :span="4" style="padding-left: 1.5rem"><div>差异/个</div></el-col>
                </el-row>
              </div>
              <div ref="tableContent" class="table-content">
                <template v-for="(item, index) in materialCapacitBalance">
                  <div  class="table-line content-line" v-if="item.operationName != null">

                    <div style="text-align: center;font-size: 80%;border: 1px rgba(31,45,61,0) solid;padding-top: 0.5rem;padding-bottom: 0.3rem">
                      <el-row>
                        <el-col :span="6"><div>{{ item.operationName }}</div></el-col>
                        <el-col :span="6" style="overflow: hidden" class="hidd" ><div>{{ item.itemDesc }}</div></el-col>
                        <el-col :span="4"><div style="font-size: xx-small">{{ item.presetQty ==0?'/':item.presetQty }}</div></el-col>
                        <el-col :span="4"><div style="overflow: hidden;font-size: xx-small">{{ item.averageQty ==0?'/': item.averageQty}}</div></el-col>
                        <el-col :span="4"><div style="overflow: hidden">{{ item.differenceQty ==0?'/': parseInt( item.differenceQty) }}</div></el-col>
                      </el-row>
                    </div>

                  </div>
                </template>
              </div>

            </div>
          </div>
        </el-col>
      </el-row>
    </div>
    <el-button name="el-icon-setting" @click="passShow = true" style="background-color: rgba(255,255,255,0);border: 0px"></el-button>


    <template>
      <el-dialog
        title="标准值参数配置"
        :visible.sync="planConfigLV"
        width="90%"
        :before-close="handleLVclose">
        <template v-for="(item,index) in webConfiglv" >
          <div >
            <div style="margin-bottom: 2rem">
              <span v-model="item.id" style="display:none "></span>
              <span v-model="item.workShop" style="display:none "></span>
              <span v-model="item.workShopBo" style="display:none "></span>
              <div>
                <div v-model="item.workShopDesc" style="color: #0B5195">{{item.workShopDesc}}</div>
                <div>

                  <el-row>
                    <el-col :span="2"><div class="grid-content bg-purple"> 三日开工率 <el-input v-model="item.threeStartlv">{{item.threeStartlv}}</el-input> </div></el-col>
                    <el-col :span="2"><div class="grid-content bg-purple-light">三日完工率<el-input v-model="item.threeFinishlv">{{item.threeFinishlv}}</el-input> </div></el-col>
                    <el-col :span="2"><div class="grid-content bg-purple"> 设备利用率<el-input v-model="item.deviceStartlv">{{item.deviceStartlv}}</el-input> </div></el-col>
                    <el-col :span="2"><div class="grid-content bg-purple-light"> 出勤<el-input v-model="item.attendancelv">{{item.attendancelv}}</el-input> </div></el-col>
                    <el-col :span="2"><div class="grid-content bg-purple"> 品质<el-input v-model="item.qualitylv">{{item.qualitylv}}</el-input> </div></el-col>

                    <el-col :span="2"><div class="grid-content bg-purple"> 产能<el-input v-model="item.capacitylv">{{item.capacitylv}}</el-input> </div></el-col>
                    <el-col :span="2"><div class="grid-content bg-purple-light"> 空转<el-input v-model="item.nullRunlv">{{item.nullRunlv}}</el-input> </div></el-col>
                    <el-col :span="2"><div class="grid-content bg-purple"> 违规<el-input v-model="item.violationlv">{{item.violationlv}}</el-input> </div></el-col>
                    <el-col :span="2"><div class="grid-content bg-purple-light"> 安灯<el-input v-model="item.anDonlv">{{item.anDonlv}}</el-input> </div></el-col>
                    <el-col :span="4"><div> <el-button icon="el-icon-success" @click="submitForm(item)" style="margin-left: 1rem;margin-top:1rem ; background-color: #00ff9e">保存修改</el-button> </div></el-col>
                  </el-row>

                </div>
              </div>

            </div>
          </div>

        </template>
      </el-dialog>
    </template>
    <!--   详情页网址 -->
    <template>
      <el-dialog
        title="计划监测设置"
        :visible.sync="planLV"
        width="70%"
        :before-close="handleClose">
        <span>这是一段信息</span>
        <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
      </el-dialog>
    </template>

    <template>
      <el-dialog
        title="车间绩效设置"
        :visible.sync="achievementsLV"
        width="70%"
        :before-close="handleClose">
        <span>这是一段信息</span>
        <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
      </el-dialog>
    </template>

    <template>
      <el-dialog
        title="异常工序设置"
        :visible.sync="procedureLV"
        width="70%"
        :before-close="handleClose">
        <span>这是一段信息</span>
        <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
      </el-dialog>
    </template>

    <!--   配置页跳转页面 -->
    <template>
      <el-dialog
        title="配置登录页"
        :visible.sync="passShow"
        width="10%"
        :before-close="handleClose">
        <span>请输入管理密码</span>
        <el-input placeholder="请输入密码" v-model="input" show-password></el-input>
        <el-button type="success" icon="el-icon-check" circle @click="isPass">提交</el-button>
        <span slot="footer" class="dialog-footer">
  </span>
      </el-dialog>
    </template>

    <!--    planOne跳转链接-->
    <template>
      <el-dialog
        title="计划监测"
        :visible.sync="planOne"
        width="70%"
        :before-close="handleClose">
        <a href="http://192.168.1.22/report-sfcCode?isHidden=true" target="_blank" style="border: 0px">批次标签报表</a>
        <a href="http://192.168.1.22/WipV2?isHidden=true" target="_blank" style="border: 0px">派工单跟踪报表</a>
        <a href="http://192.168.1.22/Wip?isHidden=true" target="_blank" style="border: 0px">在制品报表</a>
        <a href="http://192.168.1.22/ShopOrderProgress?isHidden=true" target="_blank" style="border: 0px">工单进度报表</a>

        <a href="http://192.168.1.22/PlanComplete?isHidden=true" target="_blank" style="border: 0px">计划报表</a>
        <a href="http://192.168.1.22/UserDayProduct?isHidden=true" target="_blank" style="border: 0px">员工产量日报表</a>
        <a href="http://192.168.1.22/userProduct?isHidden=true" target="_blank" style="border: 0px">员工产能报表</a>
        <a href="http://192.168.1.22/operationProduct?isHidden=true" target="_blank" style="border: 0px">工序产能报表</a>
        <a href="http://192.168.1.22/productLineStatistics?isHidden=true" target="_blank" style="border: 0px">产线产能报表</a>
        <a href="http://192.168.1.22/EquipmentCapacityAndOutPlanCapacity?isHidden=true" target="_blank" style="border: 0px">设备和出站产能报表</a>

        <a href="http://192.168.1.22/ShopOrderIrregular?isHidden=true" target="_blank" style="border: 0px">工单状态报表</a>
        <a href="http://192.168.1.22/WipV2?isHidden=true" target="_blank"  style="border: 0px">工单跟踪报表</a>
        <a href="http://192.168.1.22/productLineStatistics?isHidden=true"  target="_blank" style="border: 0px">产线产能报表</a>
        <a href="http://192.168.1.22/workShopShopOrderProduct?isHidden=true"  target="_blank" style="border: 0px">工单投入产出报表</a>
        <a href="http://192.168.1.22/ShopOrderAndDispatchInfo?isHidden=true"  target="_blank" style="border: 0px">工单详情报表</a>
        <a href="http://192.168.1.22/planOneWithShopOrder?isHidden=true" target="_blank" style="border: 0px">异常工单报表</a>
        <span slot="footer" class="dialog-footer">
  </span>
      </el-dialog>
    </template>

    <template>
      <el-dialog
        title="计划监测"
        :visible.sync="ViolationShow"
        width="70%"
        :before-close="handleClose">
        <a href="http://192.168.1.22/WorkShopIrregular?isHidden=true" target="_blank" style="border: 0px">违规报表</a>

        <span slot="footer" class="dialog-footer">
  </span>
      </el-dialog>
    </template>

    <template>
      <el-dialog
        title="计划监测"
        :visible.sync="MachineErrShow"
        width="70%"
        :before-close="handleClose">
        <a href="http://192.168.1.22/AndonUnusual?isHidden=true" target="_blank" style="border: 0px">安灯报表</a>
        <a href="http://192.168.1.22/AndonAbnormalDetails?isHidden=true" target="_blank" style="border: 0px">安灯异常明细报表</a>
        <a href="http://192.168.1.22/andonStatistics?isHidden=true" target="_blank" style="border: 0px">安灯统计报表</a>

        <span slot="footer" class="dialog-footer">
  </span>
      </el-dialog>
    </template>

    <template>
      <el-dialog
        title="计划监测"
        :visible.sync="WorkshopPerformanceShow"
        width="70%"
        :before-close="handleClose">
        <a href="http://192.168.1.22/userAttendance?isHidden=true" target="_blank" style="border: 0px">出勤报表</a>
        <a href="http://192.168.1.22/report-defectiveLabel?isHidden=true" target="_blank" style="border: 0px">不良标签报表</a>
        <span slot="footer" class="dialog-footer">
  </span>
      </el-dialog>
    </template>


  </div>

</template>
<script>
import {
  makeAPie,
  gaugeData,
  barData,
  nightingalePieData,
  userDefinedBarData,
  basicLineData,
  pieData, sangJiPie, stackBarData, basicLineSimple, lineData, doubleLineSimple,doubleNanDing
} from '@/components/echartsData'
import {
  queryPlanOne, queryPlanThree, queryPlanTwo, queryViolationDay,
  queryViolationWeek, queryViolationMonth, queryMachineErrnDay, queryMachineErrnMonth,
  queryMachineErrnWeek, queryMachineErrnType,
  workmanshipErrDay, workmanshipErrMonth, workmanshipErrWeek,
  ShopCapacitBalance, materialCapacitBalance,
  WorkshopPerformance, getConfig, updateConfig, getEchartsForVio,getShopWorkAssessment
} from '@/api/service-module/dashBoard/sixDashBoard'
import DYTable from "@/components/DYTooltip";
import {closeWebsocket, connectWebsocket, sendMessage} from "@/api/websocket";
export default {
  name: 'DashBoard',
  components: {DYTable},
  data() {
    return {
      tempData:'',
      WorkshopPerformanceShow: false,
      MachineErrShow: false,
      ViolationShow: false,
      planOne: false,
      assessment:'',
      input: '',
      passShow:false,
      webconfig: {
        dianQiCheJianThreeStartLV:'',
        zhuanZhouCheJianThreeStartLV:'',
        jiaoZhuCheJianThreeStartLV:'',
        guanKeCheJianThreeStartLV:'',
        paoGuangCheJianThreeStartLV:'',
        buJianCheJianThreeStartLV:'',
        zongZhuangCheJianThreeStartLV:'',
        xianQuanCheJianThreeStartLV:'',
        chongYaCheJianThreeSartLV:'',
        zhuSuCheJianThreeSatrtLV:'',
        xingHanCheJianThreeStartLV:'',
        xianLanCheJianThreeStartLV:'',
        dianQiCheJianThreeFinishLV:'',
        zhuanZhouCheJianThreeFinishLV:'',
        jiaoZhuCheJianThreeFinishLV:'',
        guanKeCheJianThreeFinishLV:'',
        paoGuangCheJianThreeFinishLV:'',
        buJianCheJianThreeFinishLV:'',
        zongZhuangCheJianThreeFinishLV:'',
        xianQuanCheJianThreeFinishLV:'',
        chongYaCheJianThreeFinishLV:'',
        zhuSuCheJianThreeFinishLV:'',
        xingHanCheJianThreeFinishLV:'',
        xianLanCheJianThreeFinishLV:'',
        dianQiCheJianThreeUseLV:'',
        zhuanZhouCheJianThreeUseLV:'',
        jiaoZhuCheJianThreeUseLV:'',
        guanKeCheJianThreeUseLV:'',
        paoGuangCheJianThreeUseLV:'',
        buJianCheJianThreeUseLV:'',
        zongZhuangCheJianThreeUseLV:'',
        xianQuanCheJianThreeUseLV:'',
        chongYaCheJianThreeUseLV:'',
        zhuSuCheJianThreeUseLV:'',
        xingHanCheJianThreeUseLV:'',
        xianLanCheJianThreeUseLV:'',
        dianQiCheJianThreeDaGongLV:'',
        zhuanZhouCheJianThreeDaGongLV:'',
        jiaoZhuCheJianThreeDaGongLV:'',
        guanKeCheJianThreeDaGongLV:'',
        paoGuangCheJianThreeDaGongLV:'',
        buJianCheJianThreeDaGongLV:'',
        zongZhuangCheJianThreeDaGongLV:'',
        xianQuanCheJianThreeDaGongLV:'',
        chongYaCheJianThreeDaGongLV:'',
        zhuSuCheJianThreeDaGongLV:'',
        xingHanCheJianThreeDaGongLV:'',
        xianLanCheJianThreeDaGongLV:'',
        dianQiCheJianThreePinZhiLV:'',
        zhuanZhouCheJianThreePinZhiLV:'',
        jiaoZhuCheJianThreePinZhiLV:'',
        guanKeCheJianThreePinZhiLV:'',
        paoGuangCheJianThreePinZhiLV:'',
        buJianCheJianThreePinZhiLV:'',
        zongZhuangCheJianThreePinZhiLV:'',
        xianQuanCheJianThreePinZhiLV:'',
        chongYaCheJianThreePinZhiLV:'',
        zhuSuCheJianThreePinZhiLV:'',
        xingHanCheJianThreePinZhiLV:'',
        xianLanCheJianThreePinZhiLV:'',
        dianQiCheJianThreeQuitLV:'',
        zhuanZhouCheJianThreeQuitLV:'',
        jiaoZhuCheJianThreeQuitLV:'',
        guanKeCheJianThreeQuitLV:'',
        paoGuangCheJianThreeQuitLV:'',
        buJianCheJianThreeQuitLV:'',
        zongZhuangCheJianThreeQuitLV:'',
        xianQuanCheJianThreeQuitLV:'',
        chongYaCheJianThreeQuitLV:'',
        zhuSuCheJianThreeQuitLV:'',
        xingHanCheJianThreeQuitLV:'',
        xianLanCheJianThreeQuitLV:'',
        dianQiCheJianThreeNullLV:'',
        zhuanZhouCheJianThreeNullLV:'',
        jiaoZhuCheJianThreeNullLV:'',
        guanKeCheJianThreeNullLV:'',
        paoGuangCheJianThreeNullLV:'',
        buJianCheJianThreeNullLV:'',
        zongZhuangCheJianThreeNullLV:'',
        xianQuanCheJianThreeNullLV:'',
        chongYaCheJianThreeNullLV:'',
        zhuSuCheJianThreeNullLV:'',
        xingHanCheJianThreeNullLV:'',
        xianLanCheJianThreeNullLV:'',
        dianQiCheJianThreeErrLV:'',
        zhuanZhouCheJianThreeErrLV:'',
        jiaoZhuCheJianThreeErrLV:'',
        guanKeCheJianThreeErrLV:'',
        paoGuangCheJianThreeErrLV:'',
        buJianCheJianThreeErrLV:'',
        zongZhuangCheJianThreeErrLV:'',
        xianQuanCheJianThreeErrLV:'',
        chongYaCheJianThreeErrLV:'',
        zhuSuCheJianThreeErrLV:'',
        xingHanCheJianThreeErrLV:'',
        xianLanCheJianThreeErrLV:'',
        dianQiCheJianThreeAndo:'',
        zhuanZhouCheJianThreeAndo:'',
        jiaoZhuCheJianThreeAndo:'',
        guanKeCheJianThreeAndo:'',
        paoGuangCheJianThreeAndo:'',
        buJianCheJianThreeAndo:'',
        zongZhuangCheJianThreeAndo:'',
        xianQuanCheJianThreeAndo:'',
        chongYaCheJianThreeAndo:'',
        zhuSuCheJianThreeAndo:'',
        xingHanCheJianThreeAndo:'',
        xianLanCheJianThreeAndo:'',
      },
      webConfiglv:'',
      planConfigLV:false,
      activeName1: '本日',
      activeName2: '本日',
      activeName3: '本日',
      achievementsLV:false,
      procedureLV:false,
      zeroShow: true,
      oneShow: false,
      twoShow: false,
      threeShow: false,
      fourShow: false,
      fiveShow: false,
      sixShow: false,
      sangJiPie: JSON.parse(JSON.stringify(sangJiPie)),
      pieData1: JSON.parse(JSON.stringify(pieData)),
      basicLineData1: JSON.parse(JSON.stringify(barData)),
      basicLineData2: JSON.parse(JSON.stringify(stackBarData)),
      basicLineData3: JSON.parse(JSON.stringify(stackBarData)),
      basicLineData4: JSON.parse(JSON.stringify(stackBarData)),
      nightingalePieData1: JSON.parse(JSON.stringify(nightingalePieData)),
      nightingalePieData2: JSON.parse(JSON.stringify(nightingalePieData)),
      barData1: JSON.parse(JSON.stringify(doubleLineSimple)),
      barData2: JSON.parse(JSON.stringify(barData)),
      barData: JSON.parse(JSON.stringify(barData)),
      nightingalePieData: JSON.parse(JSON.stringify(nightingalePieData)),
      userDefinedBarData: JSON.parse(JSON.stringify(userDefinedBarData)),
      basicLineData: JSON.parse(JSON.stringify(basicLineData)),
      gaugeData: JSON.parse(JSON.stringify(gaugeData)),
      makeAPie: JSON.parse(JSON.stringify(makeAPie)),
      doubleNanDing:JSON.parse(JSON.stringify(doubleNanDing)),
      basicLineSimple: JSON.parse(JSON.stringify(stackBarData)),
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '达标'
      }],
      'oneEcharts': {
        showOriginValue: true,
        data: [
          {
            name: '转轴',
            value: 4
          },
          {
            name: '成型',
            value: 5
          },
          {
            name: '浇铸',
            value: 1
          },
          {
            name: '冲压',
            value: 2
          },
          {
            name: '管壳',
            value: 2
          }
        ]
      },
      'twoData': {
        header: ['工单', '交期时效/小时'],
        headerBGC: 'rgba(255,255,255,0.28)',
        rowNum: 7,
        columnWidth: [],
        data: [
          ['D-GD022005670678', '289'],
          ['D-GD022045367892', '237'],
          ['D-GD022005425886', '569'],
          ['D-GD022005218774', '134'],
          ['D-GD022005278535', '34'],
          ['D-GD022005214758', '665'],
          ['D-GD022005253641', '346'],
          ['D-GD022005211458', '582'],
          ['D-GD022005278652', '823'],
          ['D-GD022005214243', '457']
        ]
      },
      'config': {
        data: [
          {
            name: '转子',
            value: 55
          },
          {
            name: '机壳',
            value: 120
          },
          {
            name: '摇线',
            value: 71
          },
          {
            name: '磨床',
            value: 66
          },
          {
            name: '摩擦焊',
            value: 80
          },
          {
            name: '转轴',
            value: 35
          },
          {
            name: '泵轴',
            value: 15
          }
        ],
        showValue: true
      },
      'sixconfig': {
        data: [
          {
            name: '转子半成品仓',
            value: 167
          },
          {
            name: '油漆仓',
            value: 123
          },
          {
            name: '半成品仓',
            value: 98
          },
          {
            name: '成品仓',
            value: 75
          },
          {
            name: '包材仓',
            value: 66
          }
        ],
        colors: ['#e062ae', '#fb7293', '#e690d1', '#32c5e9', '#96bfff'],
        unit: '单位',
        showValue: true
      },
      'fourconfig': {
        sort: true,
        data: [
          {
            name: 'D-GD10210818196',
            value: 55
          },
          {
            name: 'D-GD10210818144',
            value: 120
          },
          {
            name: 'D-GD10210818134',
            value: 78
          },
          {
            name: 'D-GD10210818145',
            value: 66
          },
          {
            name: 'D-GD10210818156',
            value: 80
          },
          {
            name: 'D-GD10210818678',
            value: 45
          },
          {
            name: 'D-GD10210818111',
            value: 29
          }
        ]
      },
      tableDataone: [
        {
          proline: '数据读取中',
          dayQty: '数据读取中',
          Mqty: '数据读取中',
          startlv: '数据读取中',
          flv: '数据读取中',
          endlv: '数据读取中',
          yn: '数据读取中'
        }
      ],
      tableDataBadFun: [
        {
          tips: '已领料未入库',
          tipsNum: '2',
        },
        {
          tips: '未领料未入库',
          tipsNum: '3',
        },
        {
          tips: '超期未打印',
          tipsNum: '2',
        },
        {
          tips: '未完工已结案',
          tipsNum: '2',
        },
        {
          tips: '超期未派工',
          tipsNum: '2',
        }
      ],
      tableDataBadTwo: [
        {
          tipType: '当前产能',
          tipsTwoNum: '200000',
        },
        {
          tipType: '在制工单',
          tipsTwoNum: '3',
        },
        {
          tipType: '生产中工单',
          tipsTwoNum: '2',
        },
        {
          tipType: '预计今日完成数',
          tipsTwoNum: '2',
        },
        {
          tipType: '超期未派工',
          tipsTwoNum: '2',
        }
      ],
      oneTable: {},
      planTwodata:'',
      ViolationDay:'',
      ViolationWeek:'',
      ViolationMonth:'',
      planLV: false,
      MachineErrnDay:'',
      MachineErrnWeek:'',
      MachineErrnMonth:'',
      MachineErrnType:'',
      workmanshipErrDay:'',
      workmanshipErrWeek:'',
      workmanshipErrMonth:'',
      ShopCapacitBalance: '',
      materialCapacitBalance:'',
      WorkshopPerformance:'',
    }
  },

  mounted() {
    this.rollText()
    // setTimeout(this.queryTimeOut(),1000 * 60 * 15)
    // this.query()
    this.reloadWeb()
    // this.planOneData()
    // this.planTwo()
    // this.planThree()
    // this.ViolationDayData()
    // this.Echarts()
    // this.MachineErrDay()
    // this.MachineErrType()
    // this.WorkshopPerformanceData()
    // this.getShopAssessment()
    // this.workmanshipErrDayData()
    // this.workShopCapacitBalance()
    // this.materialCapacitBalanceData()
    this.initWebData()
  },
  destroyed() {
    //页面刷新会调用销毁前的方法，就是这个，清楚页面的定时器等，防止垃圾遗留
    this.clear
    closeWebsocket()
  },
  methods: {
    reloadWeb(){
      //每隔8小时刷新一下页面，防止卡死
      setTimeout(location.reload,1000*60*60*8)
    },
    display(p) {
      this.oneShow = false, this.twoShow = false, this.threeShow = false, this.fourShow = false, this.fiveShow = false, this.sixShow = false, this.zeroShow = false
      switch (p) {
        case 'one' :
          this.oneShow = true
          break
        case 'two' :
          this.twoShow = true
          break
        case 'three' :
          this.threeShow = true
          break
        case 'four' :
          this.fourShow = true
          break
        case 'five' :
          this.fiveShow = true
          break
        case 'six' :
          this.sixShow = true
          break
        case 'zero' :
          this.zeroShow = true
          break
        default:
          this.zeroShow = true
      }
    },
    handleClick(tab, event) {
      console.log(tab, event)
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done();
        })
        .catch(_ => {});
    },
    initWebData(){
      connectWebsocket(
        // 测试地址
        process.env.VUE_APP_WS_URL+'/QueryAll/plan',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          // console.log(JSON.parse(data))
          this.tempData = JSON.parse(data)
          this.oneTable = this.tempData.planOneData
          this.planTwodata = this.tempData.planTwoData
          this.tableDataone = this.tempData.planThreeData
          this.ViolationDay = this.tempData.ViolationDayData
          this.MachineErrnDay = this.tempData.MachineErrDayData
          this.MachineErrnType = this.tempData.MachineErrTypeData
          this.workmanshipErrDay = this.tempData.workmanshipErrDayData
          this.ShopCapacitBalance = this.tempData.workShopCapacitBalanceData
          this.materialCapacitBalance = this.tempData.materialCapacitBalanceData
          this.WorkshopPerformance = this.tempData.WorkshopPerformanceData
          this.assessment = this.tempData.getShopAssessmentData

          for(let i in this.WorkshopPerformance){
              for(let k in this.MachineErrnDay) {
                if (this.WorkshopPerformance[i].workShopDesc == this.MachineErrnDay[k].workShopDesc) {
                  this.WorkshopPerformance[i].andon = this.MachineErrnDay[k].totalErrNum
                }
              }
            for(let j in this.ViolationDay){
                if (this.WorkshopPerformance[i].workShopDesc == this.ViolationDay[j].workShopDesc) {
                  var x = this.sumab(this.ViolationDay[j].fastfix) +
                    this.sumab(this.ViolationDay[j].fastdeb) +
                    this.sumab(this.ViolationDay[j].fastInOut) +
                    this.sumab(this.ViolationDay[j].deviceLoading)
                  this.WorkshopPerformance[i].violation = x
                }
            }
          }

          for( let i in this.assessment){
            this.assessment[i].day = parseInt((this.assessment[i].year*1.0) / (this.assessment[i].month*1.0) /35.5 )
            this.assessment[i].week = parseInt((this.assessment[i].year*1.0) / (this.assessment[i].month*1.0) /15.5)
          }

          this.doubleNanDing.title.text = ''
          this.doubleNanDing.legend.data = [];
          this.doubleNanDing.series[0].name = '7日内违规';
          this.doubleNanDing.series[0].data[0].name = this.tempData.EchartsData[0].fastInOut;
          this.doubleNanDing.series[0].data[0].value = this.tempData.EchartsData[0].fastInOutNum;
          this.doubleNanDing.series[0].data[1].name = this.tempData.EchartsData[0].deviceLoading;
          this.doubleNanDing.series[0].data[1].value = this.tempData.EchartsData[0].deviceLoadingNum;
          this.doubleNanDing.series[0].data[2].name = this.tempData.EchartsData[0].fastdeb;
          this.doubleNanDing.series[0].data[2].value = this.tempData.EchartsData[0].fastdebNum;
          // this.doubleNanDing.series[0].data[3].name = resEc.data[0].fastfix;
          // this.doubleNanDing.series[0].data[3].value = resEc.data[0].fastfixNum;



          this.doubleNanDing.series[1].name = '30日内违规';
          this.doubleNanDing.series[1].data[0].name = this.tempData.EchartsData[1].fastInOut;
          this.doubleNanDing.series[1].data[0].value = this.tempData.EchartsData[1].fastInOutNum;
          this.doubleNanDing.series[1].data[1].name = this.tempData.EchartsData[1].deviceLoading;
          this.doubleNanDing.series[1].data[1].value = this.tempData.EchartsData[1].deviceLoadingNum;
          this.doubleNanDing.series[1].data[2].name = this.tempData.EchartsData[1].fastdeb;
          this.doubleNanDing.series[1].data[2].value = this.tempData.EchartsData[1].fastdebNum;
          // this.doubleNanDing.series[1].data[3].name = resEc.data[1].fastfix;
          // this.doubleNanDing.series[1].data[3].value = resEc.data[1].fastfixNum;

          // console.log(JSON.parse(data).planOneData)
          // this.assessment = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    sumab(a){
      if(isNaN(a)){
        return 0;
      }else {
        return a*1.0
      }
    },

    getShopAssessment(){
      // getShopWorkAssessment().then(resp=>{
      //   if (resp.code == '200'){
      //     this.assessment = resp.data
      //   }else {
      //     let _this = this;
      //     setTimeout(() => { _this.getShopAssessments() },5*60*1000)
      //   }
      // })
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/getShopAssessment',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.assessment = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    planOneData() {
      //  queryPlanOne().then(resp=>{
      //    if (resp.code === '200') {
      //      this.oneTable = resp.data
      //    }else {
      //      let _this = this;
      //      setTimeout(() => { _this.queryone() },5*60*1000)
      //    }
      // })
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/planOne',
        // 传递给后台的数据
        'planOne',
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.oneTable = JSON.parse(data)
          console.log(this.oneTable)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    planTwo(){
      //  queryPlanTwo().then(res=>{
      //      if (res.code === '200') {
      //   this.planTwodata = res.data
      //      }else {
      //        let _this = this;
      //        setTimeout(() => { _this.queryPlan() },5*60*1000)
      //      }
      // })
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/planTwo',
        // 传递给后台的数据
        'planTwo',
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.planTwodata = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    planThree(){
      // queryPlanThree().then(rest=>{
      //   if (rest.code === '200') {
      //   this.tableDataone = rest.data
      // }else {
      //     let _this = this;
      //     setTimeout(() => { _this.queryPlanThree() },5*60*1000)
      //   }
      // })
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/planThree',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.tableDataone = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    ViolationDayData(){
      // queryViolationDay().then(resv=>{
      //     if (resv.code === '200') {
      //   this.ViolationDay = resv.data
      //     }else {
      //       let _this = this;
      //       setTimeout(() => { _this.queryViolation() },5*60*1000)
      //     }
      // })

      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/ViolationDay',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.ViolationDay = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
      // queryViolationWeek().then(resw=>{
      //   this.ViolationWeek = resw.data
      // })
      // queryViolationMonth().then(resm=>{
      //   this.ViolationMonth = resm.data
      // })
    },
    MachineErrDay(){
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/MachineErrDay',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.MachineErrnDay = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    MachineErrType(){
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/MachineErrType',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.MachineErrnType = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    //   queryMachineErrMonth(){
    //   queryMachineErrnDay().then(mres=>{
    //       if (mres.code === '200') {
    //     this.MachineErrnDay = mres.data
    //       }else {
    //         let _this = this;
    //         setTimeout(() => { _this.queryMachineErrMonth() },5*60*1000)
    //       }
    //   })
    //   // queryMachineErrnWeek().then(wres=>{
    //   //   this.MachineErrnWeek = wres.data
    //   // })
    //   // queryMachineErrnMonth().then(mres=>{
    //   //   this.MachineErrnMonth = mres.data
    //   // })
    //   queryMachineErrnType().then(type=>{
    //       if (type.code === '200') {
    //     this.MachineErrnType = type.data
    //       }else {
    //         let _this = this;
    //         setTimeout(() => { _this.queryMachineErrMonth() },5*60*1000)
    //       }
    //   })
    // },
    workmanshipErrDayData(){
      // workmanshipErrDay().then(dres=>{
      //     if (dres.code === '200') {
      //   this.workmanshipErrDay = dres.data
      //     }else {
      //       let _this = this;
      //       setTimeout(() => { _this.queryworkmanshipErr() },5*60*1000)
      //     }
      // })
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/workmanshipErrDay',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.workmanshipErrDay = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
      // workmanshipErrWeek().then(wres=>{
      //   this.workmanshipErrWeek = wres.data
      // })
      // workmanshipErrMonth().then(mres=>{
      //   this.workmanshipErrMonth = mres.data
      // })
    },
    workShopCapacitBalance(){
      // ShopCapacitBalance().then(ress=>{
      //     if (ress.code === '200') {
      //   this.ShopCapacitBalance = ress.data
      //     }else {
      //       let _this = this;
      //       setTimeout(() => { _this.queryShopCapacitBalance() },5*60*1000)
      //     }
      // })
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/workShopCapacitBalance',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.ShopCapacitBalance = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );

      // materialCapacitBalance().then(resm=>{
      //     if (resm.code === '200') {
      //   this.materialCapacitBalance = resm.data
      //     }else {
      //       let _this = this;
      //       setTimeout(() => { _this.queryShopCapacitBalance() },5*60*1000)
      //     }
      // })
    },
    materialCapacitBalanceData(){
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/materialCapacitBalance',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.materialCapacitBalance = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
    },
    WorkshopPerformanceData(){
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/WorkshopPerformance',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          this.WorkshopPerformance = JSON.parse(data)
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );
      // WorkshopPerformance().then(wrest=>{
      //     if (wrest.code === '200') {
      //   this.WorkshopPerformance = wrest.data
      //     }else {
      //       let _this = this;
      //       setTimeout(() => { _this.queryWorkshopPerformance() },5*60*1000)
      //     }
      // })
    },
    getWebConf(){
      getConfig().then(webcon=>{
        this.webConfiglv = webcon.data.data
        // console.log(webcon)
      })
    },
    Echarts(){
      connectWebsocket(
        // 测试地址
        'ws://192.168.1.32:20088/QueryAll/Echarts',
        // 传递给后台的数据
        {},
        // 成功拿到后台返回的数据的回调函数
        (data) => {
          // this.WorkshopPerformance = JSON.parse(data)
          this.doubleNanDing.title.text = ''
          this.doubleNanDing.legend.data = [];
          this.doubleNanDing.series[0].name = '7日内违规';
          this.doubleNanDing.series[0].data[0].name = data[0].fastInOut;
          this.doubleNanDing.series[0].data[0].value = data[0].fastInOutNum;
          this.doubleNanDing.series[0].data[1].name = data[0].deviceLoading;
          this.doubleNanDing.series[0].data[1].value = data[0].deviceLoadingNum;
          this.doubleNanDing.series[0].data[2].name = data[0].fastdeb;
          this.doubleNanDing.series[0].data[2].value = data[0].fastdebNum;
          // this.doubleNanDing.series[0].data[3].name = resEc.data[0].fastfix;
          // this.doubleNanDing.series[0].data[3].value = resEc.data[0].fastfixNum;


          this.doubleNanDing.series[1].name = '30日内违规';
          this.doubleNanDing.series[1].data[0].name = data[1].fastInOut;
          this.doubleNanDing.series[1].data[0].value = data[1].fastInOutNum;
          this.doubleNanDing.series[1].data[1].name = data[1].deviceLoading;
          this.doubleNanDing.series[1].data[1].value = data[1].deviceLoadingNum;
          this.doubleNanDing.series[1].data[2].name = data[1].fastdeb;
          this.doubleNanDing.series[1].data[2].value = data[1].fastdebNum;
          // this.doubleNanDing.series[1].data[3].name = resEc.data[1].fastfix;
          // this.doubleNanDing.series[1].data[3].value = resEc.data[1].fastfixNum;
          // this.returunData = data
        },
        // websocket连接失败的回调函数
        () => {
          sendMessage("im tird!")
        }
      );

      // getEchartsForVio().then(resEc=>{
      //     if (resEc.code === '200') {
      //   this.doubleNanDing.title.text = ''
      //   this.doubleNanDing.legend.data = [];
      //   this.doubleNanDing.series[0].name = '7日内违规';
      //   this.doubleNanDing.series[0].data[0].name = resEc.data[0].fastInOut;
      //   this.doubleNanDing.series[0].data[0].value = resEc.data[0].fastInOutNum;
      //   this.doubleNanDing.series[0].data[1].name = resEc.data[0].deviceLoading;
      //   this.doubleNanDing.series[0].data[1].value = resEc.data[0].deviceLoadingNum;
      //   this.doubleNanDing.series[0].data[2].name = resEc.data[0].fastdeb;
      //   this.doubleNanDing.series[0].data[2].value = resEc.data[0].fastdebNum;
      //   // this.doubleNanDing.series[0].data[3].name = resEc.data[0].fastfix;
      //   // this.doubleNanDing.series[0].data[3].value = resEc.data[0].fastfixNum;
      //
      //
      //   this.doubleNanDing.series[1].name = '30日内违规';
      //       this.doubleNanDing.series[1].data[0].name = resEc.data[1].fastInOut;
      //       this.doubleNanDing.series[1].data[0].value = resEc.data[1].fastInOutNum;
      //       this.doubleNanDing.series[1].data[1].name = resEc.data[1].deviceLoading;
      //       this.doubleNanDing.series[1].data[1].value = resEc.data[1].deviceLoadingNum;
      //       this.doubleNanDing.series[1].data[2].name = resEc.data[1].fastdeb;
      //       this.doubleNanDing.series[1].data[2].value = resEc.data[1].fastdebNum;
      //       // this.doubleNanDing.series[1].data[3].name = resEc.data[1].fastfix;
      //       // this.doubleNanDing.series[1].data[3].value = resEc.data[1].fastfixNum;
      //
      //     }else {
      //       let _this = this;
      //       setTimeout(() => { _this.getEcharts() },5*60*1000)
      //     }
      // })

    },
    submitForm(item){
      console.log(item)
      updateConfig(item).then(updaRes=>{
        if  (updaRes.code == '200'){
          return this.$message.success("修改成功");
        }
        this.getWebConf()
      })
    },
    showConfig(){
      this.getWebConf()
      this.passShow = true
    },
    isPass(){
      if (this.input == 'admin'){
        this.getWebConf()
        this.planConfigLV = true
        this.passShow = false
        this.input = ''
      }else {
        this.$message.warning("请输入正确的密码!")
        this.input = ''
      }
    },
    resetForm(){
      this.getWebConf();
    },
    handleLVclose(){
      this.planConfigLV = false
    },
    rollText() {
      let speed = 280
      let that = this
      function Marquee() {
        if (that.$refs.tableContent) {
          if (that.$refs.tableContent.scrollTop >= (that.$refs['tableContent'].offsetHeight - 50)) {
            that.$refs.tableContent.scrollTop = 0
          } else that.$refs.tableContent.scrollTop = that.$refs.tableContent.scrollTop + 1
        };
        if (that.$refs.tableContent01) {
          if (that.$refs.tableContent01.scrollTop >= (that.$refs['tableContent01'].offsetHeight - 50)) {
            that.$refs.tableContent01.scrollTop = 0
          } else that.$refs.tableContent01.scrollTop = that.$refs.tableContent01.scrollTop + 1
        };
        if (that.$refs.tableContent2) {
          if (that.$refs.tableContent2.scrollTop >= (that.$refs['tableContent2'].offsetHeight - 50)) {
            that.$refs.tableContent2.scrollTop = 0
          } else that.$refs.tableContent2.scrollTop = that.$refs.tableContent2.scrollTop + 1
        };
        if (that.$refs.tableContent3) {
          if (that.$refs.tableContent3.scrollTop >= (that.$refs['tableContent3'].offsetHeight - 50)) {
            that.$refs.tableContent3.scrollTop = 0
          } else that.$refs.tableContent3.scrollTop = that.$refs.tableContent3.scrollTop + 1
        };
        if (that.$refs.tableContent4) {
          if (that.$refs.tableContent4.scrollTop >= (that.$refs['tableContent4'].offsetHeight /4)) {
            that.$refs.tableContent4.scrollTop = 0
          } else that.$refs.tableContent4.scrollTop = that.$refs.tableContent4.scrollTop + 1
        };
        if (that.$refs.tableContent8) {
          if (that.$refs.tableContent8.scrollTop >= (that.$refs['tableContent8'].offsetHeight - 50)) {
            that.$refs.tableContent8.scrollTop = 0
          } else that.$refs.tableContent8.scrollTop = that.$refs.tableContent8.scrollTop + 1
        };
        if (that.$refs.tableContent7) {
          if (that.$refs.tableContent7.scrollTop >= (that.$refs['tableContent7'].offsetHeight /12.5)) {
            that.$refs.tableContent7.scrollTop = 0
          } else that.$refs.tableContent7.scrollTop = that.$refs.tableContent7.scrollTop + 1
        };
        if (that.$refs.tableContent9) {
          // console.log(that.$refs.tableContent9.scrollTop)
          // console.log(that.$refs['tableContent9'].offsetHeight)
          if (that.$refs.tableContent9.scrollTop >= (that.$refs['tableContent9'].offsetHeight /20)) {
            that.$refs.tableContent9.scrollTop = 0
          } else that.$refs.tableContent9.scrollTop = that.$refs.tableContent9.scrollTop + 0.5
        };
      }
      var MyMar = setInterval(Marquee, speed); //设置定时器

    }
  }
}
</script>

<style lang="scss" scoped>
.hidd {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  div {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}


.green{
  color: #00ff9e;
}
.red{
  color: red;
}

.grid-content:hover {
  background-color: #013146;
  border: 0px solid rgba(35, 191, 249, 0.7);
  box-shadow: 0px 0 50px rgba(35, 191, 249, 0.74) inset;
}

.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  background-color: #d3dce6;
}

.tt-inner {
  line-height: 12px;
  padding-top: 5px;
  width: 80px;
}

.tt-inner img {
  border: 0;
  width: 32px;
  height: 32px;
}

.tt-inner p {
  margin: 0;
  padding: 0;
  font-size: 14px;
}

a {
  border: 1px #020202 solid;
  border-radius: 9px;
  margin: 1rem;
}

#divbottom {
  margin-top: 1rem;
}
.table-content {
  height: calc(100% - 50px);
  color: #ffffff;
  overflow: hidden;
  margin-top: 0.5rem;
  height: 100%;

  .table-line:nth-of-type(odd) {
    background: rgba(122, 178, 203, 0.22);
  }

  .table-line:nth-of-type(even) {
    background: rgba(213, 196, 127, 0.22);
  }

  .table-line {
    position: relative;
    border: 1px solid rgba(23, 17, 17, 0.98);
    border-radius: 5px;
    margin-top: 0.2rem;
    .line-cell {
      word-wrap: break-word;
    }


  }
}

</style>
